CREATE TABLE [dbo].[TDCOMP_PAIN]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[TI_COMP_PAGO] [dbo].[TD_VC_003] NOT NULL,
[NU_COMP_PAGO] [dbo].[TD_VC_008] NOT NULL,
[NU_CUOT_DETA] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDCOMP_PA__NU_CU__1FB8AE52] DEFAULT ((0)),
[NU_PROC] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDCOMP_PA__NU_PR__20ACD28B] DEFAULT ((0)),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDCOMP_PA__CO_US__21A0F6C4] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDCOMP_PA__FE_US__22951AFD] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDCOMP_PA__CO_US__23893F36] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDCOMP_PA__FE_US__247D636F] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDCOMP_PAIN] ADD CONSTRAINT [PK__TDCOMP_P__CD14899324092D7A] PRIMARY KEY CLUSTERED  ([CO_EMPR], [TI_COMP_PAGO], [NU_COMP_PAGO], [NU_CUOT_DETA], [NU_PROC]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDCOMP_PAIN] ADD CONSTRAINT [FK__TDCOMP_PAIN__3AD78439] FOREIGN KEY ([CO_EMPR], [TI_COMP_PAGO], [NU_COMP_PAGO], [NU_CUOT_DETA]) REFERENCES [dbo].[TDCOMP_PAGO] ([CO_EMPR], [TI_COMP_PAGO], [NU_COMP_PAGO], [NU_CUOT_DETA])
GO
